#!/bin/bash

echo "========================================"
echo "   项目架构改造工具"
echo "========================================"
echo ""

echo "正在编译项目..."
mvn clean compile
if [ $? -ne 0 ]; then
    echo ""
    echo "编译失败！请检查项目配置。"
    exit 1
fi

echo ""
echo "开始执行架构改造..."
echo ""

mvn exec:java -Dexec.mainClass="com.tuoyu.replace.tool.ProjectRefactorTool"

echo ""
echo "========================================"
echo "   改造完成！"
echo "========================================"
echo ""
echo "请查看生成的 REFACTOR_REPORT.txt 了解详情"
echo ""

